package com.clei.utils.io;

import java.util.concurrent.TimeUnit;

/**
 * 定时任务配置
 *
 * @author Y
 * @date 2023-09-21
 **/
public class ScheduleConfig {
    /**
     * 初始延迟
     */
    private final long initialDelay;

    /**
     * 间隔周期
     */
    private final long period;

    /**
     * 时间单位
     */
    private final TimeUnit unit;

    public ScheduleConfig(long initialDelay, long period, TimeUnit unit) {
        this.initialDelay = initialDelay;
        this.period = period;
        this.unit = unit;
    }

    public long getInitialDelay() {
        return initialDelay;
    }

    public long getPeriod() {
        return period;
    }

    public TimeUnit getUnit() {
        return unit;
    }
}
